<?php

use Phinx\Migration\AbstractMigration;

class AddDeviceIdInAuthTokenTable extends AbstractMigration
{

    public function up()
    {
        $this->table("oauth_token")
            ->addColumn("device_id", "integer", [
            "limit" => 10,
            'default' => 0,
            'null' => false,
            'comment' => "设备id",
        ])->save();
    }

    public function down()
    {
        $this->table("oauth_token")
            ->removeColumn("device_id")
            ->save();
    }
}
